﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using cludg.Domain.Content.Stories;
using cludg.Web.Core.Validation;
using cludg.Web.Core.ViewModels;

namespace cludg.Web.ViewModels
{
	public class StoryEditModel : BaseModel
	{
		public Story Story { get; set; }

		[Required(ErrorMessage = ValidationConst.RequiredMessage)]
		[StringLength(200, ErrorMessage = ValidationConst.StringLengthMaxInvalidMessage)]
		[DisplayName("Заголовок")]
		public string Title { get; set; }

		[Required(ErrorMessage = ValidationConst.RequiredMessage)]
		[DisplayName("Текст")]
		[StringLength(20000, ErrorMessage = ValidationConst.StringLengthMaxInvalidMessage)]
		public string Body { get; set; }

		[DisplayName("Метки (через запятую)")]
		[StringLength(500, ErrorMessage = ValidationConst.StringLengthMaxInvalidMessage)]
		public string Tags { get; set; }
	}
}